package com.isoft.course.service.impl;

import java.util.List;

import com.isoft.user.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.isoft.course.mapper.MyTeacherCourseMapper;
import com.isoft.course.domain.MyTeacherCourse;
import com.isoft.course.service.IMyTeacherCourseService;

/**
 * 我的授课Service业务层处理
 * 
 * @author lgm
 * @date 2024-07-25
 */
@Service
public class MyTeacherCourseServiceImpl implements IMyTeacherCourseService 
{
    @Autowired
    private MyTeacherCourseMapper myTeacherCourseMapper;

    /**
     * 查询我的授课
     * 
     * @param id 我的授课主键
     * @return 我的授课
     */
    @Override
    public MyTeacherCourse selectMyTeacherCourseById(Long id)
    {
        return myTeacherCourseMapper.selectMyTeacherCourseById(id);
    }

    /**
     * 查询我的授课列表
     * 
     * @param myTeacherCourse 我的授课
     * @return 我的授课
     */
    @Override
    public List<MyTeacherCourse> selectMyTeacherCourseList(MyTeacherCourse myTeacherCourse)
    {
        return myTeacherCourseMapper.selectMyTeacherCourseList(myTeacherCourse);
    }

    /**
     * 新增我的授课
     * 
     * @param myTeacherCourse 我的授课
     * @return 结果
     */
    @Override
    public int insertMyTeacherCourse(MyTeacherCourse myTeacherCourse)
    {
        return myTeacherCourseMapper.insertMyTeacherCourse(myTeacherCourse);
    }

    /**
     * 修改我的授课
     * 
     * @param myTeacherCourse 我的授课
     * @return 结果
     */
    @Override
    public int updateMyTeacherCourse(MyTeacherCourse myTeacherCourse)
    {
        return myTeacherCourseMapper.updateMyTeacherCourse(myTeacherCourse);
    }

    /**
     * 批量删除我的授课
     * 
     * @param ids 需要删除的我的授课主键
     * @return 结果
     */
    @Override
    public int deleteMyTeacherCourseByIds(Long[] ids)
    {
        return myTeacherCourseMapper.deleteMyTeacherCourseByIds(ids);
    }

    /**
     * 删除我的授课信息
     * 
     * @param id 我的授课主键
     * @return 结果
     */
    @Override
    public int deleteMyTeacherCourseById(Long id)
    {
        return myTeacherCourseMapper.deleteMyTeacherCourseById(id);
    }

    /**
     * 查询我的课程
     * @param myTeacherCourse 我的授课
     * @return
     */
    @Override
    public List<User> selectStudentCourseList(MyTeacherCourse myTeacherCourse) {
        return myTeacherCourseMapper.selectStudentCourseList(myTeacherCourse);
    }


}
